jQuery(document).ready(function () {

$(document).ready(function () {

    $('#manageLink').click(function (event) {
		$.ajax({
			url: '/account/manage/',
			cache: false,
            type: "get",
			success: function (html) {
			    jQuery('#Main').html(html);
			}, 
			error: function (xhr, ajaxOptions, thrownError) {
			    alert('Status: ' + xhr.status + ' Response Text: ' + xhr.responseText);
			}
		});
		return false;
    });

    $('#logoutLink').click(function (event) {
        $.ajax({
            url: '/account/LogOff/',
            cache: false,
            type: "post",
            success: function (html) {
                jQuery('#Page').html(html);
            },
            error: function (xhr, ajaxOptions, thrownError) {
                alert('Status: ' + xhr.status + ' Response Text: ' + xhr.responseText);
            }
        });
        return false;
    });
    $('#loginLink').click(function (event) {
        $.ajax({
            url: '/account/Login?returnUrl=',
            cache: false,
            type: "post",
            success: function (html) {
                jQuery('#Page').html(html);
            },
            error: function (xhr, ajaxOptions, thrownError) {
                alert('Status: ' + xhr.status + ' Response Text: ' + xhr.responseText);
            }
        });
        return false;
    });

    $('#registerLink').click(function (event) {
        $.ajax({
            url: '/account/Register',
            cache: false,
            type: "post",
            success: function (html) {
                jQuery('#Page').html(html);
            },
            error: function (xhr, ajaxOptions, thrownError) {
                alert('Status: ' + xhr.status + ' Response Text: ' + xhr.responseText);
            }
        });
        return false;
    });
});});
